// mock/study.ts
// import { MockMethod } from 'vite-plugin-mock'
import fs from 'fs'
import path from 'path'
import { defineMock } from './base'

export default defineMock([
  {
    url: 'study/time/getTodayTimeRecord',
    method: ['GET'],
    body() {
      return {
        code: '00000',
        msg: '一切ok',
        data: {
          time1: '01:24:00',
          time2: '00:00',
          efficiency: '0%',
          seconds: '0',
        },
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/state/getCurrentProgram',
    method: ['GET'],
    body() {
      return {
        code: '00000',
        msg: '操作成功',
        data: {
          seriesId: '40',
          seriesName: '初中英语',
          parentSeriesId: '1069',
          parentSeriesName: '人教新目标2024（修订版）',
          programId: '1851',
          programName: '七上词汇',
          programWordNumber: '349',
          programStudyWordNumber: '18',
          studyId: '5550047591361828724',
          unitName: 'Starter Unit2',
        },
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/state/currentProgram',
    method: ['POST'],
    body({ body }) {
      const { parentSeriesId, programId, seriesId, userId, username } = body
      console.log(parentSeriesId, programId, seriesId, userId, username)
      return {
        code: '00000',
        msg: '操作成功！',
        data: null,
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/test/preTest/:seriesid/:programid',
    method: ['GET'],
    body({ params }) {
      const { seriesid, programid } = params
      console.log(seriesid, programid)
      return {
        code: '00000',
        msg: '操作成功！',
        data: {
          etcTranslation: [
            {
              spelling: 'baggage',
              meaning: '行李',
              wordId: '57146',
              isChecked: false,
              answers: [
                {
                  spelling: 'baggage',
                  meaning: '行李',
                  correct: true,
                  correctWordId: '57146',
                  realWordId: '57146',
                  disable: false,
                },
                {
                  spelling: 'eleven',
                  meaning: '十一',
                  correct: false,
                  correctWordId: '497482',
                  realWordId: '57146',
                  disable: false,
                },
                {
                  spelling: 'anthem',
                  meaning: '颂歌',
                  correct: false,
                  correctWordId: '536030',
                  realWordId: '57146',
                  disable: false,
                },
                {
                  spelling: 'secretly',
                  meaning: '秘密地',
                  correct: false,
                  correctWordId: '510959',
                  realWordId: '57146',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'pursue',
              meaning: '追求；追逐',
              wordId: '57213',
              isChecked: false,
              answers: [
                {
                  spelling: 'world-wide',
                  meaning: '遍及全球的',
                  correct: false,
                  correctWordId: '228510',
                  realWordId: '57213',
                  disable: false,
                },
                {
                  spelling: 'pursue',
                  meaning: '追求；追逐',
                  correct: true,
                  correctWordId: '57213',
                  realWordId: '57213',
                  disable: false,
                },
                {
                  spelling: 'dear',
                  meaning: 'interj. (表示惊奇、苦恼、懊悔等)呵；哎呀',
                  correct: false,
                  correctWordId: '330340',
                  realWordId: '57213',
                  disable: false,
                },
                {
                  spelling: 'a lot',
                  meaning: '大量；许多',
                  correct: false,
                  correctWordId: '559566',
                  realWordId: '57213',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'of late',
              meaning: '最近；近来',
              wordId: '57025',
              isChecked: false,
              answers: [
                {
                  spelling: 'of late',
                  meaning: '最近；近来',
                  correct: true,
                  correctWordId: '57025',
                  realWordId: '57025',
                  disable: false,
                },
                {
                  spelling: 'continue',
                  meaning: '继续',
                  correct: false,
                  correctWordId: '569966',
                  realWordId: '57025',
                  disable: false,
                },
                {
                  spelling: 'used',
                  meaning: '用过的；旧的；二手的',
                  correct: false,
                  correctWordId: '129934',
                  realWordId: '57025',
                  disable: false,
                },
                {
                  spelling: 'ancient',
                  meaning: '古代的，古老的，古式的',
                  correct: false,
                  correctWordId: '280950',
                  realWordId: '57025',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'Sofronie',
              meaning: '索芙朗妮',
              wordId: '57164',
              isChecked: false,
              answers: [
                {
                  spelling: 'Sofronie',
                  meaning: '索芙朗妮',
                  correct: true,
                  correctWordId: '57164',
                  realWordId: '57164',
                  disable: false,
                },
                {
                  spelling: 'let out',
                  meaning: '放出，发出',
                  correct: false,
                  correctWordId: '505709',
                  realWordId: '57164',
                  disable: false,
                },
                {
                  spelling: 'flaming',
                  meaning: '火红的；火焰般的',
                  correct: false,
                  correctWordId: '127154',
                  realWordId: '57164',
                  disable: false,
                },
                {
                  spelling: 'festival',
                  meaning: '节日',
                  correct: false,
                  correctWordId: '461845',
                  realWordId: '57164',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'confirm',
              meaning: '证实；确认',
              wordId: '56637',
              isChecked: false,
              answers: [
                {
                  spelling: 'confirm',
                  meaning: '证实；确认',
                  correct: true,
                  correctWordId: '56637',
                  realWordId: '56637',
                  disable: false,
                },
                {
                  spelling: 'step',
                  meaning: '台阶',
                  correct: false,
                  correctWordId: '436215',
                  realWordId: '56637',
                  disable: false,
                },
                {
                  spelling: 'citizen',
                  meaning: '公民，市民，居民',
                  correct: false,
                  correctWordId: '276634',
                  realWordId: '56637',
                  disable: false,
                },
                {
                  spelling: 'turning',
                  meaning: '拐弯处',
                  correct: false,
                  correctWordId: '7671',
                  realWordId: '56637',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'context',
              meaning: '上下文；环境；背景',
              wordId: '56913',
              isChecked: false,
              answers: [
                {
                  spelling: 'context',
                  meaning: '上下文；环境；背景',
                  correct: true,
                  correctWordId: '56913',
                  realWordId: '56913',
                  disable: false,
                },
                {
                  spelling: 'religious',
                  meaning: '1.宗教的 2.虔诚的',
                  correct: false,
                  correctWordId: '185330',
                  realWordId: '56913',
                  disable: false,
                },
                {
                  spelling: 'between',
                  meaning: '介于(两者)之间',
                  correct: false,
                  correctWordId: '447567',
                  realWordId: '56913',
                  disable: false,
                },
                {
                  spelling: 'come true',
                  meaning: '实现；成为现实',
                  correct: false,
                  correctWordId: '524030',
                  realWordId: '56913',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'axe',
              meaning: '斧；斧子',
              wordId: '56924',
              isChecked: false,
              answers: [
                {
                  spelling: 'garden',
                  meaning: '从事园艺',
                  correct: false,
                  correctWordId: '416491',
                  realWordId: '56924',
                  disable: false,
                },
                {
                  spelling: 'axe',
                  meaning: '斧；斧子',
                  correct: true,
                  correctWordId: '56924',
                  realWordId: '56924',
                  disable: false,
                },
                {
                  spelling: 'stretch',
                  meaning: '伸展',
                  correct: false,
                  correctWordId: '592045',
                  realWordId: '56924',
                  disable: false,
                },
                {
                  spelling: 'crossing',
                  meaning: '横渡；交叉点，十字路口；人行道',
                  correct: false,
                  correctWordId: '312989',
                  realWordId: '56924',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'post',
              meaning: '张贴（布告、通告等）',
              wordId: '56873',
              isChecked: false,
              answers: [
                {
                  spelling: 'flay',
                  meaning: '剥皮；诈取；严厉指责',
                  correct: false,
                  correctWordId: '116320',
                  realWordId: '56873',
                  disable: false,
                },
                {
                  spelling: 'post',
                  meaning: '张贴（布告、通告等）',
                  correct: true,
                  correctWordId: '56873',
                  realWordId: '56873',
                  disable: false,
                },
                {
                  spelling: 'quarry',
                  meaning: 'something that is hu...',
                  correct: false,
                  correctWordId: '124187',
                  realWordId: '56873',
                  disable: false,
                },
                {
                  spelling: 'interlace',
                  meaning: '编织；交错',
                  correct: false,
                  correctWordId: '108486',
                  realWordId: '56873',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'arithmetic',
              meaning: '算术   算术的；关于算术的',
              wordId: '57435',
              isChecked: false,
              answers: [
                {
                  spelling: 'arithmetic',
                  meaning: '算术   算术的；关于算术的',
                  correct: true,
                  correctWordId: '57435',
                  realWordId: '57435',
                  disable: false,
                },
                {
                  spelling: 'ground',
                  meaning: '地面',
                  correct: false,
                  correctWordId: '136314',
                  realWordId: '57435',
                  disable: false,
                },
                {
                  spelling: 'ever',
                  meaning: '曾经；从来；在任何时候',
                  correct: false,
                  correctWordId: '560103',
                  realWordId: '57435',
                  disable: false,
                },
                {
                  spelling: 'trousers',
                  meaning: '(pl.)裤子',
                  correct: false,
                  correctWordId: '218600',
                  realWordId: '57435',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'reception',
              meaning: '接待；招待会；宴会',
              wordId: '57267',
              isChecked: false,
              answers: [
                {
                  spelling: 'reception',
                  meaning: '接待；招待会；宴会',
                  correct: true,
                  correctWordId: '57267',
                  realWordId: '57267',
                  disable: false,
                },
                {
                  spelling: 'shoulder',
                  meaning: '肩；肩膀',
                  correct: false,
                  correctWordId: '591992',
                  realWordId: '57267',
                  disable: false,
                },
                {
                  spelling: 'perhaps',
                  meaning: '或许；大概',
                  correct: false,
                  correctWordId: '503917',
                  realWordId: '57267',
                  disable: false,
                },
                {
                  spelling: 'matter',
                  meaning: '事情；材料',
                  correct: false,
                  correctWordId: '564330',
                  realWordId: '57267',
                  disable: false,
                },
              ],
            },
          ],
          cteTranslation: [
            {
              spelling: 'saleswoman',
              meaning: '女推销员；女售货员',
              wordId: '56887',
              isChecked: false,
              answers: [
                {
                  spelling: 'saleswoman',
                  meaning: '女推销员；女售货员',
                  correct: true,
                  correctWordId: '56887',
                  realWordId: '56887',
                  disable: false,
                },
                {
                  spelling: 'take me home',
                  meaning: '带我回家',
                  correct: false,
                  correctWordId: '3389683',
                  realWordId: '56887',
                  disable: false,
                },
                {
                  spelling: 'voyage',
                  meaning: '航海，航行，旅行',
                  correct: false,
                  correctWordId: '13573',
                  realWordId: '56887',
                  disable: false,
                },
                {
                  spelling: 'player',
                  meaning: '选手',
                  correct: false,
                  correctWordId: '3334653',
                  realWordId: '56887',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'definite',
              meaning: '确切的；肯定的',
              wordId: '57202',
              isChecked: false,
              answers: [
                {
                  spelling: 'toad',
                  meaning: '蟾蜍，癞蛤蟆',
                  correct: false,
                  correctWordId: '135011',
                  realWordId: '57202',
                  disable: false,
                },
                {
                  spelling: 'definite',
                  meaning: '确切的；肯定的',
                  correct: true,
                  correctWordId: '57202',
                  realWordId: '57202',
                  disable: false,
                },
                {
                  spelling: 'sheep',
                  meaning: '绵羊',
                  correct: false,
                  correctWordId: '580319',
                  realWordId: '57202',
                  disable: false,
                },
                {
                  spelling: 'want',
                  meaning: '想要',
                  correct: false,
                  correctWordId: '3333353',
                  realWordId: '57202',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'assistance',
              meaning: '帮助；援助',
              wordId: '57285',
              isChecked: false,
              answers: [
                {
                  spelling: 'expulsion',
                  meaning: 'an ejection',
                  correct: false,
                  correctWordId: '125505',
                  realWordId: '57285',
                  disable: false,
                },
                {
                  spelling: 'uproar',
                  meaning: '骚动，喧嚷，鼎沸',
                  correct: false,
                  correctWordId: '105972',
                  realWordId: '57285',
                  disable: false,
                },
                {
                  spelling: 'productivity',
                  meaning: '生产率；多产',
                  correct: false,
                  correctWordId: '244236',
                  realWordId: '57285',
                  disable: false,
                },
                {
                  spelling: 'assistance',
                  meaning: '帮助；援助',
                  correct: true,
                  correctWordId: '57285',
                  realWordId: '57285',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'billabong',
              meaning: '（澳）死河；死水洼地；干河道',
              wordId: '56775',
              isChecked: false,
              answers: [
                {
                  spelling: 'billabong',
                  meaning: '（澳）死河；死水洼地；干河道',
                  correct: true,
                  correctWordId: '56775',
                  realWordId: '56775',
                  disable: false,
                },
                {
                  spelling: 'oxide',
                  meaning: '氧化物',
                  correct: false,
                  correctWordId: '253709',
                  realWordId: '56775',
                  disable: false,
                },
                {
                  spelling: 'infinite',
                  meaning: '无限的，无穷的，无边无际的',
                  correct: false,
                  correctWordId: '577942',
                  realWordId: '56775',
                  disable: false,
                },
                {
                  spelling: 'handful',
                  meaning: '把',
                  correct: false,
                  correctWordId: '64271',
                  realWordId: '56775',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'Nenana',
              meaning: '尼纳纳（美国城市）',
              wordId: '56963',
              isChecked: false,
              answers: [
                {
                  spelling: 'flu',
                  meaning: '流感',
                  correct: false,
                  correctWordId: '184415',
                  realWordId: '56963',
                  disable: false,
                },
                {
                  spelling: 'orange',
                  meaning: '橙色的；橙色',
                  correct: false,
                  correctWordId: '189058',
                  realWordId: '56963',
                  disable: false,
                },
                {
                  spelling: 'illness',
                  meaning: '病；疾病',
                  correct: false,
                  correctWordId: '560184',
                  realWordId: '56963',
                  disable: false,
                },
                {
                  spelling: 'Nenana',
                  meaning: '尼纳纳（美国城市）',
                  correct: true,
                  correctWordId: '56963',
                  realWordId: '56963',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'Alice Spring',
              meaning: '艾丽斯斯普林斯（澳大利亚城市）',
              wordId: '57239',
              isChecked: false,
              answers: [
                {
                  spelling: 'till',
                  meaning: '直到(…为止)',
                  correct: false,
                  correctWordId: '276153',
                  realWordId: '57239',
                  disable: false,
                },
                {
                  spelling: 'dough',
                  meaning: '（做面包或糕点的）生面团',
                  correct: false,
                  correctWordId: '348043',
                  realWordId: '57239',
                  disable: false,
                },
                {
                  spelling: 'Alice Spring',
                  meaning: '艾丽斯斯普林斯（澳大利亚城市）',
                  correct: true,
                  correctWordId: '57239',
                  realWordId: '57239',
                  disable: false,
                },
                {
                  spelling: 'shape',
                  meaning: '形状，外形   使成型，制造，塑造',
                  correct: false,
                  correctWordId: '129605',
                  realWordId: '57239',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'chemist',
              meaning: '药剂师；化学家',
              wordId: '57092',
              isChecked: false,
              answers: [
                {
                  spelling: 'captain',
                  meaning: '机长，船长；(陆军)上尉；(空军、海军)上校',
                  correct: false,
                  correctWordId: '270895',
                  realWordId: '57092',
                  disable: false,
                },
                {
                  spelling: 'pantry',
                  meaning: '食品室，备餐室',
                  correct: false,
                  correctWordId: '4863',
                  realWordId: '57092',
                  disable: false,
                },
                {
                  spelling: 'chemist',
                  meaning: '药剂师；化学家',
                  correct: true,
                  correctWordId: '57092',
                  realWordId: '57092',
                  disable: false,
                },
                {
                  spelling: 'a lot',
                  meaning: '大量，许多；很，非常',
                  correct: false,
                  correctWordId: '551291',
                  realWordId: '57092',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'congratulate',
              meaning: '祝贺；庆贺',
              wordId: '57205',
              isChecked: false,
              answers: [
                {
                  spelling: 'morning',
                  meaning: '早晨，上午',
                  correct: false,
                  correctWordId: '462045',
                  realWordId: '57205',
                  disable: false,
                },
                {
                  spelling: 'congratulate',
                  meaning: '祝贺；庆贺',
                  correct: true,
                  correctWordId: '57205',
                  realWordId: '57205',
                  disable: false,
                },
                {
                  spelling: 'intend',
                  meaning: '想要，打算；意指',
                  correct: false,
                  correctWordId: '230479',
                  realWordId: '57205',
                  disable: false,
                },
                {
                  spelling: 'come across',
                  meaning: '不期而遇',
                  correct: false,
                  correctWordId: '280411',
                  realWordId: '57205',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'care for',
              meaning: '喜爱；照顾',
              wordId: '56981',
              isChecked: false,
              answers: [
                {
                  spelling: 'centimetre',
                  meaning: '厘米',
                  correct: false,
                  correctWordId: '336049',
                  realWordId: '56981',
                  disable: false,
                },
                {
                  spelling: 'milk',
                  meaning: '牛奶',
                  correct: false,
                  correctWordId: '4408153',
                  realWordId: '56981',
                  disable: false,
                },
                {
                  spelling: 'care for',
                  meaning: '喜爱；照顾',
                  correct: true,
                  correctWordId: '56981',
                  realWordId: '56981',
                  disable: false,
                },
                {
                  spelling: 'bean',
                  meaning: '豆，豆科植物',
                  correct: false,
                  correctWordId: '511293',
                  realWordId: '56981',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'in a row',
              meaning: '一个接一个地；连续不断地',
              wordId: '56630',
              isChecked: false,
              answers: [
                {
                  spelling: 'class',
                  meaning: '（学校里的）班；年级；课',
                  correct: false,
                  correctWordId: '4526537',
                  realWordId: '56630',
                  disable: false,
                },
                {
                  spelling: 'physical',
                  meaning: '身体的；物理的',
                  correct: false,
                  correctWordId: '127570',
                  realWordId: '56630',
                  disable: false,
                },
                {
                  spelling: 'wag',
                  meaning: '(狗)摇(尾巴)',
                  correct: false,
                  correctWordId: '607367',
                  realWordId: '56630',
                  disable: false,
                },
                {
                  spelling: 'in a row',
                  meaning: '一个接一个地；连续不断地',
                  correct: true,
                  correctWordId: '56630',
                  realWordId: '56630',
                  disable: false,
                },
              ],
            },
          ],
          hearingTranslation: [
            {
              spelling: 'as a matter of fact',
              meaning: '事实上；其实',
              wordId: '57340',
              isChecked: false,
              answers: [
                {
                  spelling: 'as a matter of fact',
                  meaning: '事实上；其实',
                  correct: true,
                  correctWordId: '57340',
                  realWordId: '57340',
                  disable: false,
                },
                {
                  spelling: 'pretty',
                  meaning: '颇，相当；十分，非常  办漂亮的，俊俏的',
                  correct: false,
                  correctWordId: '498426',
                  realWordId: '57340',
                  disable: false,
                },
                {
                  spelling: 'inaccurate',
                  meaning: '不精密的，不准确的',
                  correct: false,
                  correctWordId: '105729',
                  realWordId: '57340',
                  disable: false,
                },
                {
                  spelling: 'fringe',
                  meaning: '（窗帘等）须边，边缘',
                  correct: false,
                  correctWordId: '296547',
                  realWordId: '57340',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'Anne Sullivan',
              meaning: '安·萨莉文（海伦的老师）',
              wordId: '57223',
              isChecked: false,
              answers: [
                {
                  spelling: 'disruption',
                  meaning: '分裂，崩溃，瓦解',
                  correct: false,
                  correctWordId: '245016',
                  realWordId: '57223',
                  disable: false,
                },
                {
                  spelling: 'soon',
                  meaning: '立即',
                  correct: false,
                  correctWordId: '420499',
                  realWordId: '57223',
                  disable: false,
                },
                {
                  spelling: 'Anne Sullivan',
                  meaning: '安·萨莉文（海伦的老师）',
                  correct: true,
                  correctWordId: '57223',
                  realWordId: '57223',
                  disable: false,
                },
                {
                  spelling: 'shirt',
                  meaning: '衬衣',
                  correct: false,
                  correctWordId: '555628',
                  realWordId: '57223',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'get hold of',
              meaning: '抓住；拿住',
              wordId: '57312',
              isChecked: false,
              answers: [
                {
                  spelling: 'be proud of',
                  meaning: '骄傲，自豪',
                  correct: false,
                  correctWordId: '499501',
                  realWordId: '57312',
                  disable: false,
                },
                {
                  spelling: 'get hold of',
                  meaning: '抓住；拿住',
                  correct: true,
                  correctWordId: '57312',
                  realWordId: '57312',
                  disable: false,
                },
                {
                  spelling: 'desirable',
                  meaning: '理想的；称心的',
                  correct: false,
                  correctWordId: '208676',
                  realWordId: '57312',
                  disable: false,
                },
                {
                  spelling: 'interfere in',
                  meaning: '干涉',
                  correct: false,
                  correctWordId: '275985',
                  realWordId: '57312',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'nowhere',
              meaning: '任何地方都不   无处；不知名的地方',
              wordId: '56849',
              isChecked: false,
              answers: [
                {
                  spelling: 'comparison',
                  meaning: '比较，对照',
                  correct: false,
                  correctWordId: '283674',
                  realWordId: '56849',
                  disable: false,
                },
                {
                  spelling: 'nowhere',
                  meaning: '任何地方都不   无处；不知名的地方',
                  correct: true,
                  correctWordId: '56849',
                  realWordId: '56849',
                  disable: false,
                },
                {
                  spelling: 'departure',
                  meaning: '离开',
                  correct: false,
                  correctWordId: '564280',
                  realWordId: '56849',
                  disable: false,
                },
                {
                  spelling: 'freedom',
                  meaning: '自由',
                  correct: false,
                  correctWordId: '440588',
                  realWordId: '56849',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'voyager',
              meaning: '航海者；航行者；航天者',
              wordId: '56612',
              isChecked: false,
              answers: [
                {
                  spelling: 'company',
                  meaning: '公司；陪伴',
                  correct: false,
                  correctWordId: '1033880',
                  realWordId: '56612',
                  disable: false,
                },
                {
                  spelling: 'agitate',
                  meaning: '鼓动，煽动',
                  correct: false,
                  correctWordId: '135567',
                  realWordId: '56612',
                  disable: false,
                },
                {
                  spelling: 'voyager',
                  meaning: '航海者；航行者；航天者',
                  correct: true,
                  correctWordId: '56612',
                  realWordId: '56612',
                  disable: false,
                },
                {
                  spelling: 'household appliance',
                  meaning: '家用电器',
                  correct: false,
                  correctWordId: '86538',
                  realWordId: '56612',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'arise',
              meaning: '(arose, arisen)出现；起来；上升',
              wordId: '56738',
              isChecked: false,
              answers: [
                {
                  spelling: 'arise',
                  meaning: '(arose, arisen)出现；起来；上升',
                  correct: true,
                  correctWordId: '56738',
                  realWordId: '56738',
                  disable: false,
                },
                {
                  spelling: 'bacterial',
                  meaning: '细菌的；由细菌引起的',
                  correct: false,
                  correctWordId: '437794',
                  realWordId: '56738',
                  disable: false,
                },
                {
                  spelling: 'hammer',
                  meaning: '铁锤，锤子',
                  correct: false,
                  correctWordId: '184781',
                  realWordId: '56738',
                  disable: false,
                },
                {
                  spelling: 'meet',
                  meaning: '见到',
                  correct: false,
                  correctWordId: '540542',
                  realWordId: '56738',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'latter',
              meaning: '（两者中）后者的',
              wordId: '56857',
              isChecked: false,
              answers: [
                {
                  spelling: 'latter',
                  meaning: '（两者中）后者的',
                  correct: true,
                  correctWordId: '56857',
                  realWordId: '56857',
                  disable: false,
                },
                {
                  spelling: 'harness',
                  meaning: '马具；类似马具的装备  1.上马具 2....',
                  correct: false,
                  correctWordId: '188169',
                  realWordId: '56857',
                  disable: false,
                },
                {
                  spelling: 'tournament',
                  meaning: '联赛，锦标赛',
                  correct: false,
                  correctWordId: '107974',
                  realWordId: '56857',
                  disable: false,
                },
                {
                  spelling: 'road',
                  meaning: '道路',
                  correct: false,
                  correctWordId: '3254280',
                  realWordId: '56857',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'Oxford',
              meaning: '牛津（英国城市，牛津大学所在地）',
              wordId: '56841',
              isChecked: false,
              answers: [
                {
                  spelling: 'Oxford',
                  meaning: '牛津（英国城市，牛津大学所在地）',
                  correct: true,
                  correctWordId: '56841',
                  realWordId: '56841',
                  disable: false,
                },
                {
                  spelling: 'submerge',
                  meaning: '潜入水中   浸没，淹没',
                  correct: false,
                  correctWordId: '8120',
                  realWordId: '56841',
                  disable: false,
                },
                {
                  spelling: 'birthday',
                  meaning: '生日',
                  correct: false,
                  correctWordId: '570294',
                  realWordId: '56841',
                  disable: false,
                },
                {
                  spelling: 'can',
                  meaning: '能',
                  correct: false,
                  correctWordId: '560389',
                  realWordId: '56841',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'Gregor Mendel',
              meaning: '格雷戈·门德尔（奥地利遗传学家）',
              wordId: '56853',
              isChecked: false,
              answers: [
                {
                  spelling: 'Gregor Mendel',
                  meaning: '格雷戈·门德尔（奥地利遗传学家）',
                  correct: true,
                  correctWordId: '56853',
                  realWordId: '56853',
                  disable: false,
                },
                {
                  spelling: 'moustache',
                  meaning: '髭，八字胡',
                  correct: false,
                  correctWordId: '438993',
                  realWordId: '56853',
                  disable: false,
                },
                {
                  spelling: 'grocer',
                  meaning: '食品杂货商',
                  correct: false,
                  correctWordId: '578090',
                  realWordId: '56853',
                  disable: false,
                },
                {
                  spelling: 'assay',
                  meaning: '化验',
                  correct: false,
                  correctWordId: '220696',
                  realWordId: '56853',
                  disable: false,
                },
              ],
            },
            {
              spelling: 'ramp',
              meaning: '斜坡弯道',
              wordId: '56653',
              isChecked: false,
              answers: [
                {
                  spelling: 'ramp',
                  meaning: '斜坡弯道',
                  correct: true,
                  correctWordId: '56653',
                  realWordId: '56653',
                  disable: false,
                },
                {
                  spelling: 'now and again',
                  meaning: '不时地，有时候',
                  correct: false,
                  correctWordId: '185243',
                  realWordId: '56653',
                  disable: false,
                },
                {
                  spelling: 'play football',
                  meaning: '踢足球',
                  correct: false,
                  correctWordId: '292740',
                  realWordId: '56653',
                  disable: false,
                },
                {
                  spelling: 'incarnate',
                  meaning: '具有肉体的；化身的',
                  correct: false,
                  correctWordId: '112599',
                  realWordId: '56653',
                  disable: false,
                },
              ],
            },
          ],
          words: null,
          title: '学前测试',
          type: '1',
          second: '3000',
          totalQestionNum: '30',
        },
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/audio/mp3/v1/:word',
    method: ['GET'],
    response({ req, res }) {
      const { params = {} } = req
      const { word } = params || {} // 从URL参数中获取word
      try {
        // 读取音频文件
        const audioPath = path.join(process.cwd(), 'mp3s', 'good.mp3')
        const audioBuffer = fs.readFileSync(audioPath)

        // 设置响应头
        res.setHeader('Content-Type', 'audio/mpeg')
        res.setHeader(
          'Content-Disposition',
          `attachment; filename*=UTF-8''${encodeURIComponent(word || 'word')}.mp3`,
        )
        res.setHeader('Server', 'nginx')
        res.setHeader('Vary', 'Access-Control-Request-Headers')

        // 设置状态码并发送响应
        res.statusCode = 200
        res.end(audioBuffer)
      } catch (error) {
        console.error('Error serving audio file:', error)
        res.statusCode = 500
        res.end('Internal Server Error')
      }
    },
  },
  {
    url: 'study/time/saveTimeRecord',
    method: ['POST'],
    body({ headers, body }) {
      console.log(headers['authorization'])

      const { seconds, type, userId } = body
      return {
        code: '00000',
        msg: '操作成功',
        data: null,
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/word/getWordsAndState',
    method: ['POST'],
    body({ headers, body }) {
      console.log(headers['authorization'])
      const {
        userId,
        username,
        seriesId,
        programId,
        unitName,
        source,
        studyId,
        isRestudy,
      } = body

      return {
        code: '00000',
        msg: '一切ok',
        data: {
          words: [
            {
              id: '56155',
              spelling: 'fiction',
              syllable: "'fikʃən",
              meaningZhCn: 'n. 小说',
              exampleEnUs: 'She writes science fiction.',
              exampleZhCn: '她写科幻小说。',
              unitName: 'Unit12',
            },
            {
              id: '56156',
              spelling: 'belief',
              syllable: "bi'li:f",
              meaningZhCn: 'n. 信念；信心；信仰',
              exampleEnUs: 'I have much belief in his honesty.',
              exampleZhCn: '我很相信他的诚实。',
              unitName: 'Unit12',
            },
            {
              id: '56157',
              spelling: 'league',
              syllable: 'li:g',
              meaningZhCn:
                'n. 里格（旧时长度单位；约为三英里或三海里）；社团；联盟',
              exampleEnUs:
                'Have you read "20,000 Leagues Under the Sea" written by Jules Verne?',
              exampleZhCn: '你读过儒勒·凡尔纳写的《海底两万里》这本书吗？',
              unitName: 'Unit12',
            },
            {
              id: '56158',
              spelling: 'balloon',
              syllable: "bə'lu:n",
              meaningZhCn: 'n. 气球',
              exampleEnUs: 'The balloon rose up slowly into the sky.',
              exampleZhCn: '气球冉冉升上天空。',
              unitName: 'Unit12',
            },
            {
              id: '56159',
              spelling: 'bulb',
              syllable: 'bʌlb',
              meaningZhCn: 'n. 电灯泡；球状物；球茎',
              exampleEnUs: 'The bulb is burnt out.',
              exampleZhCn: '灯泡烧坏了。',
              unitName: 'Unit12',
            },
            {
              id: '56160',
              spelling: 'botany',
              syllable: "'bɔtəni",
              meaningZhCn: 'n. 植物学',
              exampleEnUs:
                'In learning botany, I understand much about nature.',
              exampleZhCn: '学习植物学使我对大自然了解了许多。',
              unitName: 'Unit12',
            },
            {
              id: '56161',
              spelling: 'apply',
              syllable: "ə'plai",
              meaningZhCn: 'vi. 申请；请求  vt. 应用；运用',
              exampleEnUs: 'I want to apply for the job.',
              exampleZhCn: '我想申请这项工作。',
              unitName: 'Unit12',
            },
            {
              id: '56162',
              spelling: 'applied',
              syllable: "ə'plaid",
              meaningZhCn: 'adj. 应用的；实用的',
              exampleEnUs: 'Applied mathematics is well worth studying.',
              exampleZhCn: '应用数学很值得研究。',
              unitName: 'Unit12',
            },
            {
              id: '56163',
              spelling: 'foundation',
              syllable: "faun'deiʃən",
              meaningZhCn: 'n. 建立；基础',
              exampleEnUs: 'The rumor was without foundation.',
              exampleZhCn: '这条谣言是无根据的。',
              unitName: 'Unit12',
            },
            {
              id: '56164',
              spelling: 'servant',
              syllable: "'sə:vənt",
              meaningZhCn: 'n. 仆人；公务员；雇员',
              exampleEnUs: 'The servant is making the beds.',
              exampleZhCn: '佣人正在整理床铺。',
              unitName: 'Unit12',
            },
            {
              id: '56165',
              spelling: 'whale',
              syllable: 'hweil',
              meaningZhCn: 'n. 鲸；巨大的人（物）',
              exampleEnUs:
                "The blue whale is the world's largest living animal.",
              exampleZhCn: '蓝鲸是当今世界上最大的动物。',
              unitName: 'Unit12',
            },
            {
              id: '56166',
              spelling: 'hunter',
              syllable: 'hʌntə',
              meaningZhCn: 'n. 猎人；搜索者',
              exampleEnUs:
                'The hunter agreed to take us to go hunting tomorrow.',
              exampleZhCn: '猎人同意明天带我们去打猎。',
              unitName: 'Unit12',
            },
            {
              id: '56167',
              spelling: 'collision',
              syllable: "kə'liʒən",
              meaningZhCn: 'n. 碰撞；（利益、意见等）冲突',
              exampleEnUs:
                'Five people died during the collision between the two buses.',
              exampleZhCn: '两辆公共汽车相撞有5人罹难。',
              unitName: 'Unit12',
            },
            {
              id: '56168',
              spelling: 'companion',
              syllable: "kəm'pænjən",
              meaningZhCn: 'n. 同伴；同伙',
              exampleEnUs: 'He proved himself to be an amusing companion.',
              exampleZhCn: '他证实了自己是个有趣的伙伴。',
              unitName: 'Unit12',
            },
            {
              id: '56169',
              spelling: 'overboard',
              syllable: "'əuvəbɔ:d",
              meaningZhCn: 'adv. 向船外；从船上落（或抛）入水中',
              exampleEnUs: 'The girl fell overboard and drowned.',
              exampleZhCn: '那个女孩从船上掉入水中淹死了。',
              unitName: 'Unit12',
            },
            {
              id: '56170',
              spelling: 'submarine',
              syllable: "'sʌbməri:n",
              meaningZhCn: 'n. 潜水艇',
              exampleEnUs:
                'I went down in a submarine to experience the ocean.',
              exampleZhCn: '我乘坐潜水艇进行海底体验。',
              unitName: 'Unit12',
            },
            {
              id: '56171',
              spelling: 'permanent',
              syllable: "'pə:mənənt",
              meaningZhCn: 'adj. 永久的；固定的',
              exampleEnUs: 'I guess I prefer the permanent one.',
              exampleZhCn: '我想我会选择永久的那个。',
              unitName: 'Unit12',
            },
            {
              id: '56172',
              spelling: 'guest',
              syllable: 'gest',
              meaningZhCn: 'n. 客人；旅客；客座教授',
              exampleEnUs: 'He has a guest now.',
              exampleZhCn: '他现在有客人。',
              unitName: 'Unit12',
            },
            {
              id: '56173',
              spelling: 'voyage',
              syllable: "'vɔiiʤ",
              meaningZhCn: 'n. 航海；航空；航行',
              exampleEnUs: "When I retire, I'll take a long sea voyage.",
              exampleZhCn: '我退休后将进行一次长途的航海旅行。',
              unitName: 'Unit12',
            },
            {
              id: '56174',
              spelling: 'iron',
              syllable: "'aiən",
              meaningZhCn: 'n. 铁',
              exampleEnUs: 'Strike while the iron is hot.',
              exampleZhCn: '趁热打铁。',
              unitName: 'Unit12',
            },
            {
              id: '56175',
              spelling: 'aboard',
              syllable: "ə'bɔ:d",
              meaningZhCn: 'adv. 在船（或飞机、车）上；船上；登机',
              exampleEnUs: 'The luggage was taken aboard the ship.',
              exampleZhCn: '行李被运上了船。',
              unitName: 'Unit12',
            },
            {
              id: '56176',
              spelling: 'lamp',
              syllable: 'læmp',
              meaningZhCn: 'n. 灯',
              exampleEnUs: 'The floor lamp in my room is out.',
              exampleZhCn: '我房间的落地台灯坏了。',
              unitName: 'Unit12',
            },
            {
              id: '56177',
              spelling: 'dislike',
              syllable: "dis'laik",
              meaningZhCn: 'vt. 不喜欢；讨厌',
              exampleEnUs: 'I especially dislike onions.',
              exampleZhCn: '我特别不喜欢洋葱。',
              unitName: 'Unit12',
            },
            {
              id: '56178',
              spelling: 'prisoner',
              syllable: "'prizənə",
              meaningZhCn: 'n. 失去自由的人；犯人；俘虏',
              exampleEnUs: 'They must be looking for the escaped prisoner.',
              exampleZhCn: '他们一定是在寻找逃犯。',
              unitName: 'Unit12',
            },
            {
              id: '56179',
              spelling: 'gentle',
              syllable: "'ʤentl",
              meaningZhCn: 'adj. 温和的；温柔的；文雅的',
              exampleEnUs: 'A gentle wind was blowing through the trees.',
              exampleZhCn: '轻风从林间吹过。',
              unitName: 'Unit12',
            },
            {
              id: '56180',
              spelling: 'Iceland',
              syllable: 'aislənd',
              meaningZhCn: '冰岛（欧洲国家）',
              exampleEnUs:
                "You're going to be seeing a lot more of him in Iceland.",
              exampleZhCn: '到了冰岛后你会了解他更多的。',
              unitName: 'Unit12',
            },
            {
              id: '56181',
              spelling: 'layer',
              syllable: "'leiə",
              meaningZhCn: 'n. 层；地层',
              exampleEnUs: 'There are many layers of knowledge.',
              exampleZhCn: '知识有许多层面。',
              unitName: 'Unit12',
            },
            {
              id: '56182',
              spelling: 'marble',
              syllable: "'mɑ:bl",
              meaningZhCn: 'n. 大理石；大理石制品',
              exampleEnUs: 'Do they have marble tables and chairs?',
              exampleZhCn: '他们有大理石餐桌和椅子吗？',
              unitName: 'Unit12',
            },
            {
              id: '56183',
              spelling: 'shore',
              syllable: 'ʃɔ:',
              meaningZhCn: 'n. 岸；滨',
              exampleEnUs:
                'How far is it from the shore of the Pacific to the mountains?',
              exampleZhCn: '从太平洋沿岸到山区有多远？',
              unitName: 'Unit12',
            },
            {
              id: '56184',
              spelling: 'luggage',
              syllable: "'lʌgiʤ",
              meaningZhCn: 'n. （总称）行李',
              exampleEnUs: "My luggage is too heavy. I can't move it.",
              exampleZhCn: '我的行李太重了，拿不动。',
              unitName: 'Unit12',
            },
            {
              id: '56185',
              spelling: 'brilliant',
              syllable: "'briljənt",
              meaningZhCn: 'adj. 聪明的；杰出的；耀眼的',
              exampleEnUs:
                'The novel is considered a brilliant work of suspense.',
              exampleZhCn: '这部小说被认为是悬疑小说的杰作。',
              unitName: 'Unit12',
            },
            {
              id: '56186',
              spelling: 'phenomenon',
              syllable: "fi'nɔminən",
              meaningZhCn: 'n. 现象；奇迹',
              exampleEnUs:
                'International terrorism is not just a recent phenomenon.',
              exampleZhCn: '国际恐怖主义并不是近年才有的现象。',
              unitName: 'Unit12',
            },
            {
              id: '56187',
              spelling: 'labour',
              syllable: 'leibə',
              meaningZhCn: 'n. （体力）劳动；努力',
              exampleEnUs: 'It takes a lot of labour to build a railroad.',
              exampleZhCn: '修筑一条铁路要付出很多劳动。',
              unitName: 'Unit12',
            },
            {
              id: '56188',
              spelling: 'hesitate',
              syllable: "'heziteit",
              meaningZhCn: 'vi. 犹豫；踌躇',
              exampleEnUs: "Don't hesitate any more!",
              exampleZhCn: '别再犹豫了！',
              unitName: 'Unit12',
            },
            {
              id: '56189',
              spelling: 'creation',
              syllable: "kri'eiʃən",
              meaningZhCn: 'n. 创造；产生',
              exampleEnUs:
                'The plan should result in the creation of 200 new jobs.',
              exampleZhCn: '这项计划会创造出200个新工作。',
              unitName: 'Unit12',
            },
            {
              id: '56190',
              spelling: 'horror',
              syllable: "'hɔrə",
              meaningZhCn: 'n. 恐怖；恐惧',
              exampleEnUs: 'The news is full of horror.',
              exampleZhCn: '这条新闻令人恐惧。',
              unitName: 'Unit12',
            },
            {
              id: '56191',
              spelling: 'horrible',
              syllable: "'hɔrəbl",
              meaningZhCn: 'adj. 可怕的；令人恐惧的',
              exampleEnUs: 'It was a horrible place to live.',
              exampleZhCn: '住在那个地方令人恐惧。',
              unitName: 'Unit12',
            },
            {
              id: '56192',
              spelling: 'grave',
              syllable: 'greiv',
              meaningZhCn: 'n. 坟墓；墓穴；死亡',
              exampleEnUs: 'Is there life beyond the grave?',
              exampleZhCn: '人死后有来生吗？',
              unitName: 'Unit12',
            },
            {
              id: '56193',
              spelling: 'butcher',
              syllable: "'buʧə",
              meaningZhCn: 'n. 屠夫；屠杀者',
              exampleEnUs: "The butcher's knife is very sharp.",
              exampleZhCn: '屠夫的刀非常锋利。',
              unitName: 'Unit12',
            },
            {
              id: '56194',
              spelling: 'curtain',
              syllable: "'kə:tn",
              meaningZhCn: 'n. 窗帘；门帘；（舞台上的）幕',
              exampleEnUs: 'He drew the curtain to keep the sun off.',
              exampleZhCn: '他拉上窗帘遮挡阳光。',
              unitName: 'Unit12',
            },
            {
              id: '56195',
              spelling: 'lip',
              syllable: 'lip',
              meaningZhCn: 'n. 嘴唇；唇状物',
              exampleEnUs: 'He kissed her on the lips.',
              exampleZhCn: '他吻了她的嘴唇。',
              unitName: 'Unit12',
            },
            {
              id: '56196',
              spelling: 'brainstorm',
              syllable: "'brein.stɔ:m",
              meaningZhCn: 'v. 献计献策  n．头脑风暴；突然想到的好主意',
              exampleEnUs: 'Jim had a sudden brainstorm.',
              exampleZhCn: '吉姆突然想到一个好主意。',
              unitName: 'Unit12',
            },
            {
              id: '56197',
              spelling: 'Jules Verne',
              syllable: null,
              meaningZhCn: '儒勒·凡尔纳（法国作家）',
              exampleEnUs: 'Jules Verne is a very famous French writer.',
              exampleZhCn: '儒勒·凡尔纳是法国著名作家。',
              unitName: 'Unit12',
            },
            {
              id: '56198',
              spelling: 'make a living',
              syllable: null,
              meaningZhCn: '谋生',
              exampleEnUs:
                'He left his office job to try to make a living on the land.',
              exampleZhCn: '他辞去了办公室的工作，以务农为生。',
              unitName: 'Unit12',
            },
            {
              id: '56199',
              spelling: 'Aronnax',
              syllable: "'ærənæks",
              meaningZhCn: '埃瑞纳克斯（姓氏）',
              exampleEnUs: 'Mr. Aronnax is one of my good friends.',
              exampleZhCn: '埃瑞纳克斯先生是我的好朋友之一。',
              unitName: 'Unit12',
            },
            {
              id: '56200',
              spelling: 'set out',
              syllable: null,
              meaningZhCn: '出发；上路',
              exampleEnUs: 'What time do you set out?',
              exampleZhCn: '你何时出发？',
              unitName: 'Unit12',
            },
            {
              id: '56201',
              spelling: 'Nemo',
              syllable: "'ni:məu",
              meaningZhCn: '尼莫（男子名）',
              exampleEnUs: 'I go to find my son Nemo!',
              exampleZhCn: '我去找我的儿子尼莫！',
              unitName: 'Unit12',
            },
            {
              id: '56202',
              spelling: 'Nautilus',
              syllable: "'nɔ:tiləs",
              meaningZhCn: 'n. 鹦鹉螺',
              exampleEnUs: 'Nautilus is a kind of Mollusca.',
              exampleZhCn: '鹦鹉螺是一种软体动物。',
              unitName: 'Unit12',
            },
            {
              id: '56203',
              spelling: 'in public',
              syllable: null,
              meaningZhCn: '公开地；公然',
              exampleEnUs: "She doesn't like to be praised in public.",
              exampleZhCn: '她不喜欢别人当众表扬她。',
              unitName: 'Unit12',
            },
            {
              id: '56204',
              spelling: 'Frankenstein',
              syllable: "'fræŋkənstain",
              meaningZhCn: '弗兰肯斯坦（姓氏）',
              exampleEnUs: 'You know I turned down Miss Frankenstein?',
              exampleZhCn: '你知道我拒绝了弗兰肯斯坦小姐吗？',
              unitName: 'Unit12',
            },
            {
              id: '56205',
              spelling: 'throw light upon',
              syllable: null,
              meaningZhCn: '阐明某事；使某事显得非常清楚',
              exampleEnUs: 'His words threw light upon my mind.',
              exampleZhCn: '他的话使我豁然开朗。',
              unitName: 'Unit12',
            },
            {
              id: '56206',
              spelling: 'cut up',
              syllable: null,
              meaningZhCn: '切碎；剪碎',
              exampleEnUs: 'Cut up the vegetable very fine.',
              exampleZhCn: '要把蔬菜切得很精细。',
              unitName: 'Unit12',
            },
          ],
          state: null,
        },
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/state/currentUnit',
    method: ['POST'],
    body({ headers, body }) {
      console.log(headers)
      const {
        userId,
        username,
        seriesId,
        programId,
        wordId,
        wordIdx,
        groupId,
        fortify,
        unitName,
        source,
        errors,
        rights,
        end,
        errorWordInfo,
      } = body

      return {
        code: '00000',
        msg: '操作成功！',
        data: null,
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/history/getHistoryWordById',
    method: ['GET'],
    body({ query }) {
      console.log(query)

      const {
        studentId,
        seriesId,
        programId,
        unitName,
        wordId,
        studyId,
        source,
      } = query

      return {
        code: '00000',
        msg: '一切ok',
        data: [
          {
            id: '2945396',
            spelling: 'textbook',
            syllable: "'tekstbuk",
            meaningZhCn: 'n.教科书；课本',
            studyPercent: 20,
            wclass: 'word-level-10',
            studyTimes: '2',
            studyWrongTimes: '2',
            isStudy: true,
            nextTimeStr: '0',
            nextTime: '0',
          },
          {
            id: '2945398',
            spelling: 'conversation',
            syllable: ".kɔnvə'seiʃən",
            meaningZhCn: 'n.交谈；谈话',
            studyPercent: 30.33,
            wclass: 'word-level-10',
            studyTimes: '2',
            studyWrongTimes: '1',
            isStudy: true,
            nextTimeStr: '0',
            nextTime: '0',
          },
          {
            id: '2945401',
            spelling: 'aloud',
            syllable: "ə'laud",
            meaningZhCn: 'adv．大声地；出声地',
            studyPercent: 30.33,
            wclass: 'word-level-10',
            studyTimes: '2',
            studyWrongTimes: '1',
            isStudy: true,
            nextTimeStr: '0',
            nextTime: '0',
          },
        ],
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/word/record/saveRecord',
    method: ['POST'],
    body({ body }) {
      console.log(body)
      const {
        studentId,
        seriesId,
        programId,
        wordId,
        unitName,
        status,
        source,
        studyId,
        from,
        spellType,
        isTestWord,
      } = body
      return {
        code: '00000',
        msg: '操作成功',
        data: '5550047338495628967',
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/word/record/updateRecord',
    method: ['POST'],
    body({ body }) {
      console.log(body)
      const {
        studentId,
        seriesId,
        programId,
        unitName,
        source,
        studyId,
        wordId,
      } = body
      return {
        code: '00000',
        msg: '操作成功！',
        data: null,
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/test/saveRecord',
    method: ['POST'],
    body({ body }) {
      console.log(body)
      const {
        seriesId,
        programId,
        timeConsuming,
        socre,
        qnumber,
        remark,
        type,
        studyId,
        userId,
        unitId,
        wrongWordIds,
        rightWordIds,
        unchooseWordIds,
      } = body
      return {
        code: '00000',
        msg: '操作成功',
        data: null,
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/test/isPreTest/:seriesid/:programid',
    method: ['GET'],
    body({ params }) {
      console.log(params)
      const { seriesid, programid } = params

      return {
        code: '00000',
        msg: '操作成功',
        data: {
          id: '5550047591361828724',
          type: '1',
          seriesId: '1069',
          programId: '1851',
          unitName: null,
          timeConsuming: '90000',
          score: '7',
          qnumber: '30',
          remark: '本课程对你来说有点难度，你可以换一个其他课程。',
          status: '1',
          studentId: '102474',
          createUser: '102474',
          createTime: '2025-05-21 21:37:13',
          updateTime: '2025-05-21 21:37:13',
          updateUser: '102474',
          studyId: null,
        },
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/word/record/saveRecord',
    method: ['POST'],
    body({ body }) {
      console.log(body)
      const {
        studentId,
        seriesId,
        programId,
        wordId,
        unitName,
        status,
        source,
        studyId,
        from,
        isTestWord,
      } = body
      return {
        code: '00000',
        msg: '操作成功',
        data: '5550048010658011169',
        success: true,
        fail: false,
      }
    },
  },
  {
    url: 'study/state/restudyProgram',
    method: ['POST'],
    body({ body }) {
      console.log(body)
      const {
        studyId,
        studentId,
        seriesId,
        programId,
        unitName,
        source,
        isCleanPreTest,
      } = body
      return {
        code: '00000',
        msg: '操作成功',
        data: null,
        success: true,
        fail: false,
      }
    },
  },

  // 获取单元测试试卷内容
  {
    url: 'api/client/v1/test/unit-test/:unitId',
    method: ['GET'],
    body({ params }) {
      const { unitId } = params
      console.log('获取单元测试试卷内容, unitId:', unitId)

      return {
        code: '00000',
        data: {
          testId: '13',
          title: '单元测试 - 第一单元：问候语',
          type: 2,
          second: '1800',
          totalQuestionNum: '10',
          etcTranslation: [
            {
              wordId: '5',
              spelling: 'Sorry',
              meaning: '抱歉',
              answers: [
                {
                  spelling: '钢笔',
                  meaning: '钢笔',
                  correct: 0,
                },
                {
                  spelling: '抱歉',
                  meaning: '抱歉',
                  correct: 1,
                },
                {
                  spelling: '天气',
                  meaning: '天气',
                  correct: 0,
                },
                {
                  spelling: '椅子',
                  meaning: '椅子',
                  correct: 0,
                },
              ],
            },
            {
              wordId: '6',
              spelling: 'Yes',
              meaning: '是的',
              answers: [
                {
                  spelling: '兄弟',
                  meaning: '兄弟',
                  correct: 0,
                },
                {
                  spelling: '写',
                  meaning: '写',
                  correct: 0,
                },
                {
                  spelling: '是的',
                  meaning: '是的',
                  correct: 1,
                },
                {
                  spelling: '袜子',
                  meaning: '袜子',
                  correct: 0,
                },
              ],
            },
            {
              wordId: '7',
              spelling: 'No',
              meaning: '不',
              answers: [
                {
                  spelling: '不',
                  meaning: '不',
                  correct: 1,
                },
                {
                  spelling: '橡皮',
                  meaning: '橡皮',
                  correct: 0,
                },
                {
                  spelling: '冷的',
                  meaning: '冷的',
                  correct: 0,
                },
                {
                  spelling: '老师',
                  meaning: '老师',
                  correct: 0,
                },
              ],
            },
          ],
          cteTranslation: [
            {
              wordId: '3',
              spelling: 'Please',
              meaning: '请',
              answers: [
                {
                  spelling: 'Please',
                  meaning: '请',
                  correct: 1,
                },
                {
                  spelling: 'Pen',
                  meaning: '钢笔',
                  correct: 0,
                },
                {
                  spelling: 'Mother',
                  meaning: '母亲',
                  correct: 0,
                },
                {
                  spelling: 'Rabbit',
                  meaning: '兔子',
                  correct: 0,
                },
              ],
            },
            {
              wordId: '1',
              spelling: 'Hello',
              meaning: '你好',
              answers: [
                {
                  spelling: 'Mother',
                  meaning: '母亲',
                  correct: 0,
                },
                {
                  spelling: 'Eight',
                  meaning: '八',
                  correct: 0,
                },
                {
                  spelling: 'Hello',
                  meaning: '你好',
                  correct: 1,
                },
                {
                  spelling: 'Milk',
                  meaning: '牛奶',
                  correct: 0,
                },
              ],
            },
            {
              wordId: '4',
              spelling: 'Thank',
              meaning: '感谢',
              answers: [
                {
                  spelling: 'Eight',
                  meaning: '八',
                  correct: 0,
                },
                {
                  spelling: 'Father',
                  meaning: '父亲',
                  correct: 0,
                },
                {
                  spelling: 'Five',
                  meaning: '五',
                  correct: 0,
                },
                {
                  spelling: 'Thank',
                  meaning: '感谢',
                  correct: 1,
                },
              ],
            },
            {
              wordId: '2',
              spelling: 'Goodbye',
              meaning: '再见',
              answers: [
                {
                  spelling: 'Write',
                  meaning: '写',
                  correct: 0,
                },
                {
                  spelling: 'Goodbye',
                  meaning: '再见',
                  correct: 1,
                },
                {
                  spelling: 'Finger',
                  meaning: '手指',
                  correct: 0,
                },
                {
                  spelling: 'Black',
                  meaning: '黑色',
                  correct: 0,
                },
              ],
            },
          ],
          hearingTranslation: [
            {
              wordId: '9',
              spelling: 'Night',
              meaning: '夜晚',
              answers: [
                {
                  spelling: 'Night',
                  meaning: '夜晚',
                  correct: 1,
                },
                {
                  spelling: 'Egg',
                  meaning: '鸡蛋',
                  correct: 0,
                },
                {
                  spelling: 'Monkey',
                  meaning: '猴子',
                  correct: 0,
                },
                {
                  spelling: 'Warm',
                  meaning: '温暖的',
                  correct: 0,
                },
              ],
            },
            {
              wordId: '10',
              spelling: 'Friend',
              meaning: '朋友',
              answers: [
                {
                  spelling: 'Mouth',
                  meaning: '嘴巴',
                  correct: 0,
                },
                {
                  spelling: 'Friend',
                  meaning: '朋友',
                  correct: 1,
                },
                {
                  spelling: 'Eraser',
                  meaning: '橡皮',
                  correct: 0,
                },
                {
                  spelling: 'Panda',
                  meaning: '熊猫',
                  correct: 0,
                },
              ],
            },
            {
              wordId: '8',
              spelling: 'Morning',
              meaning: '早晨',
              answers: [
                {
                  spelling: 'Chair',
                  meaning: '椅子',
                  correct: 0,
                },
                {
                  spelling: 'Egg',
                  meaning: '鸡蛋',
                  correct: 0,
                },
                {
                  spelling: 'Morning',
                  meaning: '早晨',
                  correct: 1,
                },
                {
                  spelling: 'Brother',
                  meaning: '兄弟',
                  correct: 0,
                },
              ],
            },
          ],
        },
        msg: '一切ok',
      }
    },
  },

  // 获取测试记录列表
  {
    url: 'api/client/v1/unit-test-record/page',
    method: ['GET'],
    body({ query }) {
      console.log('获取测试记录列表, query:', query)
      const { programId, pageNum = 1, pageSize = 10 } = query

      // 模拟测试记录数据
      const mockRecords = [
        {
          id: '1',
          seriesId: null,
          programId: null,
          unitId: '1',
          unitName: 'Unit 1: Greetings',
          userId: '4',
          testId: '11',
          timeConsuming: 10,
          score: 40,
          questionNumber: null,
          remark: null,
          type: 2,
          studyId: null,
          wrongWordIds: '9,7,1,8,3,2',
          rightWordIds: '4,10,6,5',
          unchooseWordIds: '',
          wrongWordSpellings: [
            'Hello',
            'Goodbye',
            'Please',
            'No',
            'Morning',
            'Night',
          ],
          rightWordSpellings: ['Thank', 'Sorry', 'Yes', 'Friend'],
          unchooseWordSpellings: [],
          status: 1,
          studentId: null,
          createUser: null,
          updateUser: null,
        },
        {
          id: '2',
          seriesId: null,
          programId: null,
          unitId: '2',
          unitName: 'Unit 2: Colors',
          userId: '4',
          testId: '12',
          timeConsuming: 15,
          score: 80,
          questionNumber: null,
          remark: null,
          type: 2,
          studyId: null,
          wrongWordIds: '11,12',
          rightWordIds: '13,14,15,16,17,18,19,20',
          unchooseWordIds: '',
          wrongWordSpellings: ['Red', 'Blue'],
          rightWordSpellings: [
            'Green',
            'Yellow',
            'Black',
            'White',
            'Orange',
            'Purple',
            'Pink',
            'Brown',
          ],
          unchooseWordSpellings: [],
          status: 1,
          studentId: null,
          createUser: null,
          updateUser: null,
        },
        {
          id: '3',
          seriesId: null,
          programId: null,
          unitId: '3',
          unitName: 'Unit 3: Numbers',
          userId: '4',
          testId: '13',
          timeConsuming: 20,
          score: 60,
          questionNumber: null,
          remark: null,
          type: 2,
          studyId: null,
          wrongWordIds: '21,22,23,24',
          rightWordIds: '25,26,27,28,29,30',
          unchooseWordIds: '31,32',
          wrongWordSpellings: ['One', 'Two', 'Three', 'Four'],
          rightWordSpellings: ['Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten'],
          unchooseWordSpellings: ['Eleven', 'Twelve'],
          status: 1,
          studentId: null,
          createUser: null,
          updateUser: null,
        },
      ]

      return {
        code: '00000',
        data: {
          list: mockRecords,
          total: mockRecords.length,
          pageNum: parseInt(pageNum),
          pageSize: parseInt(pageSize),
        },
        msg: '一切ok',
      }
    },
  },

  // 提交测试试卷
  {
    url: 'api/client/v1/unit-test/save',
    method: ['POST'],
    body({ body }) {
      console.log('提交测试试卷:', body)
      const {
        testId,
        userId,
        unitId,
        score,
        time_spent,
        wrong_word_ids,
        right_word_ids,
        unchoose_word_ids,
        userAnswers,
      } = body

      console.log('测试结果统计:')
      console.log('- 用户ID:', userId)
      console.log('- 单元ID:', unitId)
      console.log('- 测试分数:', score)
      console.log('- 测试用时:', time_spent, '秒')
      console.log('- 正确单词ID:', right_word_ids)
      console.log('- 错误单词ID:', wrong_word_ids)
      console.log('- 未选择单词ID:', unchoose_word_ids)

      return {
        code: '00000',
        data: {
          testRecordId: Math.floor(Math.random() * 1000000),
          testScore: score,
          correctAnswers: right_word_ids
            ? right_word_ids.split(',').filter((id) => id).length
            : 0,
          wrongAnswers: wrong_word_ids
            ? wrong_word_ids.split(',').filter((id) => id).length
            : 0,
          unansweredQuestions: unchoose_word_ids
            ? unchoose_word_ids.split(',').filter((id) => id).length
            : 0,
          message: '试卷提交成功',
        },
        msg: '一切ok',
      }
    },
  },
])
